package com.app.support.utils;

import org.apache.commons.codec.binary.Base64;

/**
 * Created by Lichaojie on 2017/3/11. It's a beautiful day.
 */
public class Base64Util {
    public static String url2SimpleString(String url) {
        Base64 base64 = new Base64();
        return base64.encodeAsString(url.getBytes());
    }

    public static String simpleString2Url(String simpleString) {
        byte[] bytes = Base64.decodeBase64(simpleString.getBytes());
        return new String(bytes);
    }
}
